home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_pru_sharpboulder_geometry.cog < prev    next >
Text File  |  1999-11-15  |  977b  |  52 lines

  1. # Jones 3D Cog Script
  2. #
  3. # PRU_sharpBoulder_geometry.cog 
  4. #
  5. # Modified version of class_SharpBoulder.cog to allow tagging of faces for raft damage
  6. #
  7. # [MDR]    [GGJ]
  8. #
  9. # (C) 1999 LucasArts Entertainment Company LLC. All Rights Reserved
  10. #
  11. # ===================================================================
  12.  
  13. symbols
  14.  
  15. message     touched
  16.  
  17. surface        rock0
  18. surface        rock1        
  19. surface        rock2        
  20. surface        rock3        
  21. surface        rock4
  22.  
  23. thing        player        local
  24. int            n_damage    local
  25. int            wait=0        local
  26. int            victim        local
  27.  
  28. end
  29. # ===================================================================
  30. code
  31.  
  32. touched:
  33. Print("touched");
  34. player = GetLocalPlayerThing();
  35.  
  36. if ((GetSourceRef() == player) && (wait != 1))
  37. {
  38.     Print("inside if statement");
  39.     
  40.     n_damage = 10000; # 10000 is 10 percent of raft total
  41.  
  42.     wait = 1;
  43.     
  44.     DamageThing(player, n_damage, 0x00400000, victim);
  45.     
  46.     Sleep(1.0); // so we don't damage him every frame
  47.     
  48.     wait = 0;
  49. }
  50. return;
  51. end
  52.